let Singleton = (function () {
  let instance; // 用于存储单例实例

  function createInstance() {
    // 创建单例的逻辑
    let object = new Object("I am the instance");
    object.say = () => {
      console.log("say---");
    };
    return object;
  }

  return {
    getInstance: function () {
      console.log("走这里111");
      if (!instance) {
        console.log("走这里222");
        instance = createInstance();
      }
      return instance;
    },
  };
})();

function getAdderss() {
  let amapPlugin = Singleton.getInstance();

  amapPlugin.say();
}
export default { getAdderss };
